<admintpl file="header" />

<link href="__TMPL__Public/assets/css/infomation.css" rel="stylesheet" />
</head>
<body>
    <div class="wrap">
        <ul class="nav nav-tabs">
            <li><a href="{:U('Attendance/index')}">考勤管理</a></li>
            <li class="active"><a href="{:U('Attendance/add')}">新增考勤</a></li>
        </ul>  
        <section class="tab-pane active fade in" id="access">
            <div class="row">
                <div class="col-xs-12 col-md-12 col-lg-12">
                    <div class="panel panel-info">

                        <div class="panel-body">
                            <form method="post" class="form-horizontal " action="{:U('Attendance/add_post')}">
                                <table class="table table-bordered">
                                    <tr>
                                            <p class="indent20">
                                                <div class="controls" style="margin-left: 20px">
                                                  <ol>
                                                      <li>
                                                        <span style="width:200px !important;">导入考勤</span>
                                                        <a href="javascript:void(0);" class="btn upBtn btn-primary" name="attachment_1" style="padding: 6px;margin-left:15px; margin-bottom: 15px; line-height: 0.7em;">上传</a>
                                                      </li>
                                                  </ol>
                                                  <input type="file" id="upFile" name="upFile" style="display:none" />
                                                </div>
                                            </p>
                                            
                                        </td>
                                    </tr>
                                </table>
                                <div class="form-actions">
                                    <button type="submit" class="btn btn-primary js-ajax-submit">{:L('SAVE')}</button>
                                    <a class="btn btn-default" href="javascript:history.back(-1);">{:L('BACK')}</a>
                                </div>
                            </form>                   
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
    <script src="__PUBLIC__/js/common.js"></script>
    <script type="text/javascript">
        $(document).ready(function(e) {
            window.obj = '';
            // 选择图片
            $(document).on("click", ".upBtn", function(e) {
                window.obj = $(this);
                $("#upFile").click();
            });
            // 文件选择器change事件
            $("#upFile").on("change", function(){
                UploadOneFile("{:U('Attendance/upload')}", "attendance");
            });
        });
    </script>
</body>
</html>